﻿using System;

namespace TurtleEngine.Helper.BackgroundWorker
{
	 /// <summary>
	 ///
	 /// </summary>
	 /// <typeparam name="T"></typeparam>
	 public class WorkerResult<T>
	 {
		  /// <summary>
		  /// Initializes a new instance of the <see cref="WorkerResult{T}" /> class.
		  /// </summary>
		  /// <param name="result">The result.</param>
		  /// <param name="error">The error.</param>
		  public WorkerResult(T result, Exception error)
		  {
				Result = result;
				Error = error;
		  }

		  /// <summary>
		  /// Gets the error.
		  /// </summary>
		  /// <value>
		  /// The error.
		  /// </value>
		  public Exception Error { get; private set; }

		  /// <summary>
		  /// Gets the result.
		  /// </summary>
		  /// <value>
		  /// The result.
		  /// </value>
		  public T Result { get; private set; }
	 }
}